package com.zige.zige.utils;

import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 * Created by Fei on 2015/11/30.
 */
public class Sha1Utils {


    public static byte[] sha1InternalEncode(String in) {
        byte[] out = null;
        try {
            MessageDigest messagedigest = MessageDigest.getInstance("SHA-1");
            messagedigest.update(in.getBytes());
            out = messagedigest.digest();
        } catch (NoSuchAlgorithmException e) {
        } catch (UnsupportedOperationException e) {
        }
        return out;
    }

}
